package com.usian.user.controller;


import com.usian.model.common.dtos.ResponseResult;
import com.usian.model.user.dtos.AuthDto;
import com.usian.user.service.ApUserIdentityService;
import com.usian.utils.common.contants.user.AdminConstans;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/api/v1/auth")
public class ApUserIdentityController {

    @Autowired
    private ApUserIdentityService apUserIdentityService;


    //提交信息的方法

    //审核成功
    @PostMapping("/authPass1")
    public ResponseResult idEntityPass(@RequestBody AuthDto dto){
        // 1
        return apUserIdentityService.updateStatus(dto, AdminConstans.PASS_AUTH);
    }

//    //审核失败
//    @PostMapping("/authFail1")
//    public ResponseResult idEntityFail(@RequestBody AuthDto dto){
//        //2
//        return apUserIdentityService.updateStatus(dto,AdminConstans.FAIL_AUTH);
//    }
}
